package com.lwj.liwanjia.view.activity.xiaoxi;

import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import android.widget.TextView;

import com.lwj.liwanjia.R;
import com.lwj.liwanjia.adapter.XiaoxiAdapter;
import com.lwj.liwanjia.base.BaseActivity;
import com.superrecycleview.superlibrary.recycleview.SuperRecyclerView;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.OnClick;

public class XiaoxiActivity extends BaseActivity {

    @BindView(R.id.tv_left)
    TextView tvLeft;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.rlv_xiaoxi)
    SuperRecyclerView rlvXiaoxi;

    private List<String> list = new ArrayList<>();
    private XiaoxiAdapter adapter;

    @Override
    protected void initView() {
        tvLeft.setVisibility(View.VISIBLE);
        tvTitle.setText("消息");
        LinearLayoutManager manager = new LinearLayoutManager(this);
        manager.setOrientation(LinearLayoutManager.VERTICAL);
        rlvXiaoxi.setLayoutManager(manager);
        rlvXiaoxi.setRefreshEnabled(false);
        rlvXiaoxi.setLoadMoreEnabled(false);
        adapter = new XiaoxiAdapter(this, list);
        rlvXiaoxi.setAdapter(adapter);
    }

    @Override
    protected void initData() {
        list.add("1");
        list.add("1");
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_xiaoxi;
    }


    @OnClick(R.id.tv_left)
    public void onViewClicked() {
        finish();
    }
}
